import { ApiProperty } from '@nestjs/swagger';

export class BaseVo {
  @ApiProperty({ description: '主键ID', example: 1 })
  id: number;

  @ApiProperty({
    description: '创建时间',
    example: new Date(),
  })
  createTime: Date;

  @ApiProperty({
    description: '更新时间',
    example: new Date(),
  })
  updateTime: Date;

  @ApiProperty({
    description: '是否删除',
    example: false,
  })
  isDelete: boolean;

  @ApiProperty({
    description: '版本号',
    example: 1,
  })
  version: number;
}

export class BaseResponseVo {
  @ApiProperty({
    description: '状态码',
    example: 200,
  })
  code: number;

  @ApiProperty({
    description: '提示信息',
    example: '操作成功',
  })
  message: string;
}

export class PaginationVo {
  @ApiProperty({
    description: '总条数',
    example: 10,
  })
  total: string;
  @ApiProperty({
    description: '每页大小',
    example: 10,
  })
  pageSize: string;
  @ApiProperty({
    description: '当前页',
    example: 1,
  })
  page: number;
  @ApiProperty({
    description: '总页数',
    example: 100,
  })
  pages: number;
}
